<?php   if ($sf_user->isAuthenticated()) { ?>                                
<li class="menu-int-li borderCornersTop backgroundWhite">Preguntas al vendedor</li>
<div class="menu-int-content borderCornersBottom" style="padding: 10px;">
<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('producto/'.($form->getObject()->isNew() ? 'createComentario' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
      <tr>
        <td>
          <?php echo $form->renderGlobalErrors() ?>
          <?php echo $form['user_id']->renderError() ?>
          <?php echo $form['user_id'] ?>
          <?php echo $form['producto_id']->renderError() ?>
          <?php echo $form['producto_id'] ?>
          <?php echo $form['comentario_status_id']->renderError() ?>
          <?php echo $form['comentario_status_id'] ?> 
      
          <?php echo $form['pregunta']->renderError() ?>
          <?php echo $form['pregunta'] ?>
  
            <?php echo $form->renderHiddenFields(false) ?>
              <br><br>
              <div class="clear"></div>
          <?php if ($sf_user->hasFlash('notice')): ?>
              <div class="notice"> <?php echo $sf_user->getFlash('notice') ?></div>
            <?php endif; ?>

            <?php if ($sf_user->hasFlash('error')): ?>
              <div class="error"><?php echo $sf_user->getFlash('error') ?></div>
            <?php endif; ?>
          <div class="clear"></div>
              <div id="usuarioIngresarBoton">
              <input type="submit" value="Enviar Pregunta" />          
              </div>
            
           
          </td>
      </tr>
  </table>
</form>
    </div>
            
        <?php } ?>